package com.effectivejava.retrunEmptyCollcationRatherThanNull;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ReturnEmptyColRatherthanNull {
	private List<String> arrays;

	public List getArrays() {
		if (arrays == null)
			// Collections.EMPTY_MAP, Collections.EMPTY_SET
			return Collections.EMPTY_LIST;

		return arrays;
	}

	public static void main(String[] args) {
		ReturnEmptyColRatherthanNull test = new ReturnEmptyColRatherthanNull();
		List resultEmpty = test.getArrays();
		if (resultEmpty.isEmpty()) {
			System.out.println("This is an empty list");
		}

		Integer a = 11;
		switch(a){
			case 11 : System.out.println(" 11 "); 
			break;
			case 100 : System.out.println(" 11 "); 
			break;
		}
		
		int i = 124_123_123;
		System.out.println(i);
		Map<String, List<String>> anagrams = new HashMap<>();
	}
}
